﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="cn_points_for" Codebehind="points_for.aspx.cs" %>

<%@ Register Src="~/cn/UserControl/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="~/cn/UserControl/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>
        <%=KeywordsBind() %>
        <%=(new Gift.WebApp.BasicSet()).TitleBind() %>
    </title>
    <meta name="Keywords" content="<%=KeywordsBind() %><%=(new Gift.WebApp.BasicSet()).KeywordBind() %>" />
    <meta name="Description" content="<%=KeywordsBind() %><%=(new Gift.WebApp.BasicSet()).DescriptionBind() %>" />
    <link href="/script/css/master.css"
        type="text/css" rel="stylesheet" />

    <script language="Javascript" type="text/javascript" src="/script/js/jquery-1.6.2.min.js"></script>


    <script type="text/javascript">
        function send_request(url, poststr) {
            http_request = false;
            if (window.XMLHttpRequest) {
                http_request = new XMLHttpRequest();
                if (http_request.overrideMimeType) {
                    http_request.overrideMimeType('text/xml');
                }
            } else if (window.ActiveXObject) {
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
                } catch (e) {
                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) { }
                }
            }
            if (!http_request) return false;
            http_request.onreadystatechange = processRequest;
            http_request.open("POST", url, true);
            http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            http_request.send(poststr);
        }
        function processRequest() {
            if (http_request.readyState == 4) {
                if (http_request.status == 200) {
                    if (http_request.responseText == "0")
                        TB_show(null, "/cn/login.html?TB_iframe=true&height=370&width=640", false);
                    else {
                        confirmMessage('您确定要兑换此物品吗？', '/cn/points_for_info.html?id=' + http_request.responseText);
                    }
                } else { }
            }
        }
        function pointsFor(id, integral) {
            send_request("pointsForHandler.ashx", "id=" + id + "&integral=" + integral);
        }
    </script>

</head>
<body>
    <uc1:header ID="Header1" runat="server" />
    <%Response.Write(PointsForBind()); %>
    <uc2:footer ID="Footer1" runat="server" />
</body>
</html>
